<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="dbconn.jsp"%>
<%
	String path = request.getContextPath();	
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<basehref="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>合同管理系统</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/pikaday.css"  rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/pikaday.min.js"></script>
</head>

<body>
<form action="form_create.jsp" method="post">			
				  <div class="place">
					    <span>位置：</span>
					    <ul class="placeul">
					    <li><a href="#">首页</a></li>
					    <li>创建合同</li>
					    </ul>
					    </div>
					    
					    <div class="formbody">
					    
					    <div class="formtitle"><span>合同基本信息</span></div>
					    
					    <ul class="forminfo">
					    <li><label>合同编号</label><input  name="con_id" type="text" class="dfinput" />
					    </li>
					    <li><label>合同名称</label><input name="con_name" type="text" class="dfinput" />
					    </li>
					    <li>
					      <label>签订日期</label>
					      <input name="sigin_date" type="text" class="dfinput" id="datepicker" /></li>
					    <li>
					      <label>截止日期</label>
					      <input name="closing_date" type="text" class="dfinput" id="datepicker2" /></li>
					    <li>
					    	<label>合同金额</label><input name="con_amount" type="text" id="input1" onkeyup="javascript:textChanged()" class="dfinput" />
					    </li>
					    <li>
					    	<label>已支付金额</label><input name="con_pay" type="text" id="input2" onkeyup="javascript:textChanged()" class="dfinput" />
					    </li>
					    <li>
					    	<label>未支付金额</label><input name="con_nonpay" type="text"id="input3" class="dfinput" />
					    </li>
					    <li><label>合同状态</label>
					    <select class="dfinput">
					      <option value="待审批">0-待审批</option>
					    </select>
					    </li>
					    <li>
					    	<label>合同附件</label>
					    	<input class="dfinput" type="file" accept="doc/*" name="pic" >
					    </li>
					    <li>
					    	<label>草拟人</label><input name="con_drafter" type="text" class="dfinput" />
					    </li>
					    <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="确认提交"/></li>
					    
					    </ul>
					    </div>
					    <script type="text/javascript">
					    
					        var picker = new Pikaday(
					        {
					            field: document.getElementById('datepicker'),
					            firstDay: 1,
					            minDate: new Date('2000-01-01'),
					            maxDate: new Date('2020-12-31'),
					            yearRange: [2000,2020]
					        });
							var picker2 = new Pikaday(
					        {
					            field: document.getElementById('datepicker2'),
					            firstDay: 1,
					            minDate: new Date('2000-01-01'),
					            maxDate: new Date('2020-12-31'),
					            yearRange: [2000,2020]
					        });
							
							function textChanged()
							{
								document.getElementById('input3').value=
								document.getElementById('input1').value-document.getElementById('input2').value;
							}
					    
    					</script>
</form>
</body>
</html>